'''
Created on Aug 16, 2009

@author: user
'''

import cliques.mdp.limitedSampling
import random
class RandomLimitedSampling(cliques.mdp.limitedSampling.LimitedSampling):
    '''
    classdocs
    '''


    def __init__(self, k, edge_prob, num_of_nodes):
        cliques.mdp.limitedSampling.LimitedSampling.__init__(self, k, edge_prob, num_of_nodes)

    def choose_heuristic_action(self,state):
        actions=list(state.actions())
        if len(actions)>0:
            return actions[random.randint(0,len(actions)-1)]
        else:
            return None
    